Skip to content

Fix sonar errors - #632

Open
mykola-kobets-epam wants to merge 9 commits into
aosedge:developfrom
mykola-kobets-epam:fix-sonar-errors
Open

Fix sonar errors#632
mykola-kobets-epam wants to merge 9 commits into
aosedge:developfrom
mykola-kobets-epam:fix-sonar-errors

Conversation

@mykola-kobets-epam

Copy link
Copy Markdown
Collaborator

No description provided.


State(State&&) = default;
State& operator=(State&&) = default;
State(State&&) noexcept = default;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove . at the end of commit message

}

digest = it->mIndexDigest;
digest = it->mIndexDigest; // NOSONAR cpp:S5912 - Assign stays within StaticString capacity

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to find another solution.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

replaced with Assign in some cases

Comment thread src/core/common/pkcs11/pkcs11.cpp Outdated
pin.Clear();

srand(::time(nullptr)); // use current time as seed for random generator
srand(::time(nullptr)); // NOSONAR cpp:S5020 - C++ <random> not available in this codebase

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can randomItf be used instead?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, fixed

}

path = fs::JoinPath(mConfig.mImagePath, cLayersFolder, alg, hash);
path = fs::JoinPath(

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

new Sonar issue?

Use pointer or reference to avoid slicing from "StaticString<512>" to "String".

Make sure that moving an objectis "noexcept"
Move and swap operations should be "noexcept"

Signed-off-by: Mykola Kobets <mykola_kobets@epam.com>
Use pointer or reference to avoid slicing
Suppress false-positive slicing for String/Array views over Static*

Signed-off-by: Mykola Kobets <mykola_kobets@epam.com>
Replace "module" with another name

Signed-off-by: Mykola Kobets <mykola_kobets@epam.com>
Replace "srand"/"rand" with the facilities in <random>
Suppress: C++ <random> not available in this codebase

Signed-off-by: Mykola Kobets <mykola_kobets@epam.com>
Suppress false-positive lock already acquired / lock order reversal

Signed-off-by: Mykola Kobets <mykola_kobets@epam.com>
Use the value returned from the function

Signed-off-by: Mykola Kobets <mykola_kobets@epam.com>
Signed-off-by: Mykola Kobets <mykola_kobets@epam.com>
Replace this builtin type with an alias that makes the type size explicit

Signed-off-by: Mykola Kobets <mykola_kobets@epam.com>
Make an overloaded operator a hidden friend

Signed-off-by: Mykola Kobets <mykola_kobets@epam.com>
@sonarqubecloud

sonarqubecloud Bot commented Aug 5, 2026

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
57.2% Coverage on New Code (required ≥ 80%)
D Security Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants